//
//  WBCell.swift
//  WeiBoAPP
//
//  Created by 张学飞 on 2019/7/29.
//  Copyright © 2019 zxf. All rights reserved.
//

import UIKit

class WBCell: UITableViewCell {

    
    @IBOutlet weak var headimage: UIImageView!
    
    @IBOutlet weak var nameLabel: UILabel!
    
    @IBOutlet weak var titleLabel: UILabel!
    
    @IBOutlet weak var signLabel: UILabel!
    
    @IBOutlet weak var statusToolBar: WBStatusTool!
  
    @IBOutlet weak var picturesView: WBStatusPictureView!
    
    
    var viewModel:WBStatueViewModel? {
    
        didSet {
        
            nameLabel.text = viewModel?.status.text
            signLabel.text = viewModel?.status.user?.sigin
            statusToolBar.viewModel = viewModel
            
            picturesView.heightCons.constant = viewModel?.pictureViewSize.height ?? 0
            
        }
    
    
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        selectionStyle = .none
        
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    @IBAction func selectButton(_ sender: Any) {
        
    }
    
    
    

}
